@echo off
setlocal ENABLEDELAYEDEXPANSION

set CONFIG=./classes/config.setting
set STARTCONFIG=-Xmx500m -Xms100m -Xss256k

:: 读取配置文件第一行作为标题
if exist "%CONFIG%" (
	for /f "delims=" %%t in (%CONFIG%) do (
		set title=%%t
		
		goto :START
	)
) else (
	set title=Java Service
)

:START

:: 设置窗口标题
title %title%

:: 启动MainClass
java %STARTCONFIG% -classpath "./classes;./lib/*" cn.virens.App %START_PARAM%